#pragma once

#include <gofcl_usbfs_gusbcs.h>

typedef struct {
	u32_s timeout_cal : 3;
	u32_s : 5;
	u32_s srp_en : 1;
	u32_s hnp_en : 1;
	u32_s turnaround_time_clocks : 4;
	u32_s : 15;
	u32_s force_host_en : 1;
	u32_s force_dev_en : 1;
	u32_s : 1;
} usbfs_gusbcs_expl_s;

_Static_assert(sizeof(usbfs_gusbcs_expl_s) == 4,
	       "Struct usbfs_gusbcs_expl_s defined error!");

static inline void usbfs_control(usbfs_gusbcs_expl_s gusbcs) {
	union {
		usbfs_gusbcs_expl_s e;
		usbfs_gusbcs_s g;
	} eg = {
		.e = gusbcs,
	};
	usbfs_wreg_gusbcs_s(eg.g);
}
